package com.menggudf.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name="medicalTaboo")
public class MedicalTaboo implements Serializable{

    /**
     * 
     */
    private static final long serialVersionUID = 246063680277139624L;

    private int id;
    private MedicalDB medicalDB;
    private String taboo;
    
    @Id
    @Column(name="id",unique=true,nullable=false)
    @GeneratedValue(strategy=GenerationType.IDENTITY)
    public int getId() {
        return id;
    }
    public void setId(int id) {
        this.id = id;
    }
    
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "medicalId", nullable = false)
    public MedicalDB getMedicalDB() {
        return medicalDB;
    }
    public void setMedicalDB(MedicalDB medicalDB) {
        this.medicalDB = medicalDB;
    }
    
    @JoinColumn(name = "taboo")
    public String getTaboo() {
        return taboo;
    }
    public void setTaboo(String taboo) {
        this.taboo = taboo;
    }
    
}
